﻿namespace _进制转换
{
    internal class Program
    {
 
        static void Main(string[] args)
        {
          
            
            int I = HighAndLowToInt(0X00, 0XD1);
            byte hexByte = 0X64;
            int decimalValue = Convert.ToInt32(hexByte);

            Console.WriteLine($"Hexadecimal (byte): 0x{hexByte:X2}");
            Console.WriteLine($"Decimal: {decimalValue}");
        }
        public static int HighAndLowToInt(byte high, byte low)
        {
            return (int)((high << 8) | low);

        }
       
    }
}
